home *** CD-ROM | disk | FTP | other *** search
/ MacHome 2001 January / MacHome Magazine Demo Disc January 2001.iso / mac / Software / Networking / InterMapper 3.0 - PPC.sea / InterMapper 3.0 - PPC / InterMapper™ 3.0-PPC / InterMapper™ 3.0-PPC.rsrc / PrTy_156_com.dartware.tcp.http.proxy < prev    next >
Encoding:
Text File  |  2000-07-24  |  4.4 KB  |  119 lines

  1. <!-- 
  2.     HTTP (Proxy) (com.dartware.tcp.http.proxy)
  3.     Copyright © 2000 Dartware, LLC. All rights reserved.
  4. -->
  5.  
  6. <header>
  7.     type            =     "tcp-script"
  8.     package            =     "com.dartware"
  9.     probe_name        =    "tcp.http.proxy"
  10.     human_name        =    "HTTP (Proxy)"
  11.     version            =     "1.1"
  12.     address_type    =     "IP"
  13.     port_number        =    "80"
  14.     
  15.     old_protocol    =     "8"            # Backward compat. with old numbering scheme.
  16.     old_script        =     "8120"
  17.  
  18. </header>
  19.  
  20. <description>
  21.  
  22. ≤GB≥Hypertext Transfer Protocol (HTTP) - Proxy≤P≥
  23.  
  24. The protocol used to transfer web pages on the World Wide Web, defined in ≤U2≥RFC 2068≤P0≥ and  ≤U2≥RFC 1945≤P0≥. The default TCP port number for HTTP connections is port 80.
  25.  
  26. This TCP probe lets you test that a web server can be accessed using a remote proxy server as an intermediary. For example, this probe can check if your web server is accessible from some remote location on the Internet (e.g. www.proxymate.com).
  27.  
  28. ≤i≥URL≤p≥ is the full URL to the desired page on the web server,including the “http://” scheme (e.g. “http://www.intermapper.com”)
  29.  
  30. ≤i≥Proxy User ID≤p≥ is your user ID for the proxy server. Leave this field blank if no authentication is required to use the proxy server.
  31.  
  32. ≤i≥Proxy Password≤p≥ is your password for the proxy server. Leave this field blank if no authentication is required to use the proxy server.
  33.  
  34. ≤i≥String to verify≤p≥ is a string to verify in the data returned by the HTTP server.  For example, if you are retrieving a web page, you might search for “<HTML>” or “<P>” to verify that the data is HTML.
  35.  
  36. ≤i≥User Agent≤p≥ is the string that identifies this InterMapper client probe to the proxy web server. Some proxy servers block traffic at the proxy based on the User-Agent identity. This parameter lets you optionally override InterMapper's default User-Agent setting. If you leave this parameter blank, InterMapper sends a User-Agent  string of “InterMapper/version”, where version is the current version number of InterMapper.
  37. </description>
  38.  
  39. <parameters>
  40.  
  41. "URL"                    =    "http://www.intermapper.com"
  42. "Proxy User ID"            =    ""
  43. "Proxy Password"        =    ""
  44. "String to verify"        =    "<HTML>"
  45. "User Agent"            =     ""
  46.  
  47. </parameters>
  48.  
  49. <script>
  50.  
  51. CONN #60 (connect timeout in secs)
  52. WAIT #30 @IDLE (idle timeout in secs)
  53. DISC @DISCONNECT
  54. SEND "GET ${URL} HTTP/1.0\r\n"
  55. CHCK "${User Agent}" else #+3
  56. SEND "User-Agent: ${User Agent}\r\n"
  57. GOTO #+2
  58. SEND "User-Agent: InterMapper/${_VERSION}\r\n"
  59. CHCK "${Proxy User ID}${Proxy Password}" else goto #+2
  60. SEND "Proxy-Authorization: Basic ${_BASE64:${Proxy User ID}:${Proxy Password}}\r\n"
  61. SEND "Cache-Control: no-cache\r\n"
  62. SEND "Pragma: no-cache\r\n"
  63. SEND "\r\n"
  64. MTCH "HTTP/"i else goto @UNEXPECTED_GREETING
  65. MTCH "200" else goto @UNAVAIL_GET_RESPONSE
  66. LINE OFF
  67. DISC if disconnected goto @NO_MATCH   (added line in 2.1.1b1)
  68. EXPT "${String to verify}"i else goto @NO_MATCH
  69. DONE OKAY
  70.  
  71. @IDLE:
  72. DONE DOWN "[HTTP (PROXY)] No data for ${_IDLETIMEOUT} seconds.  Was expecting \"${_STRINGTOMATCH}\". [Line ${_IDLELINE}]"
  73.  
  74. @UNEXPECTED_GREETING:
  75. DONE DOWN "[HTTP (PROXY)] Unexpected greeting from port ${_REMOTEPORT}. (${_LINE:50})"
  76.  
  77. @NO_MATCH:
  78. DONE WARN "[HTTP (PROXY)] \"${String to verify}\" not found in returned HTTP data."
  79.  
  80. @UNAVAIL_GET_RESPONSE:
  81. MTCH m"50[0-9]" else goto @BAD_GET_RESPONSE
  82. DONE DOWN "[HTTP (ROXY)] ${_LINE:50} (${URL})"
  83.  
  84. @BAD_GET_RESPONSE:
  85. MTCH "201" ELSE #+2
  86. DONE WARN "[HTTP (PROXY)] 201 Created (${URL})"
  87. MTCH "202" ELSE #+2
  88. DONE WARN "[HTTP (PROXY)] 202 Accepted (${URL})"
  89. MTCH "204" ELSE #+2
  90. DONE WARN "[HTTP (PROXY)] 204 No Content (${URL})"
  91. MTCH "301" ELSE #+2
  92. DONE WARN "[HTTP (PROXY)] 301 Moved Permanently (${URL})"
  93. MTCH "302" ELSE #+2
  94. DONE WARN "[HTTP (PROXY)] 302 Moved Temporarily (${URL})"
  95. MTCH "304" ELSE #+2
  96. DONE WARN "[HTTP (PROXY)] 304 Not Modified (${URL})"
  97. MTCH "400" ELSE #+2
  98. DONE WARN "[HTTP (PROXY)] 400 Bad Request (${URL})"
  99. MTCH "401" ELSE #+2
  100. DONE WARN "[HTTP (PROXY)] 401 Unauthorized (${URL})"
  101. MTCH "403" ELSE #+2
  102. DONE WARN "[HTTP (PROXY)] 403 Forbidden (${URL})"
  103. MTCH "404" ELSE #+2
  104. DONE WARN "[HTTP (PROXY)] 404 Not Found (${URL})"
  105. MTCH "500" ELSE #+2
  106. DONE ALRM "[HTTP (PROXY)] 500 Internal Server Error (${URL})"
  107. MTCH "501" ELSE #+2
  108. DONE ALRM "[HTTP (PROXY)] 501 Not Implemented (${URL})"
  109. MTCH "502" ELSE #+2
  110. DONE ALRM "[HTTP (PROXY)] 502 Bad Gateway (${URL})"
  111. MTCH "503" ELSE #+2
  112. DONE ALRM "[HTTP (PROXY)] 503 Service Unavailable (${URL})"
  113. DONE ALRM "[HTTP (PROXY)] Unknown Error Code ${_LINE:4} (${URL})"
  114.  
  115. @DISCONNECT:
  116. DONE DOWN "[HTTP (PROXY)] Disconnected from port ${_REMOTEPORT} after ${_SECSCONNECTED} seconds."
  117.  
  118. </script>
  119.